package unit2;


public class Ex2_19_Back {
    public static void main(String[] args) {
        int a[] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19};
        int t;
        System.out.println("数组的初始状态为：");
        for (int i = 0; i < a.length; i++)
            System.out.print("  " + a[i]);
        System.out.println();
        for (int i = 0; i < a.length / 2; i++) {
            t = a[i];
            a[i] = a[a.length - i - 1];
            a[a.length - i - 1] = t;
        }
        System.out.println("数组逆序存放后的状态为：");
        for (int i = 0; i < a.length; i++)
            System.out.print("  " + a[i]);
    }
}
